import { defineStore } from 'pinia';

export const useActivtiesStore = defineStore('activties', () => {
  // 单个活动详情
  const activityDetails = ref({
    activityServeBo: {},
    activitySessionBoList: []
  });

  // 设置活动详情
  const setActivityDetails = (value) => {
    activityDetails.value = value;
  };

  // 订单号很多哈
  const orderNo = ref('');

  // 设置订单号
  const setOrderNo = (value) => {
    orderNo.value = value;
  };

  // 价格
  const activitiesPrice = ref(0);
  // 设置价格
  const setPrice = (value) => {
    activitiesPrice.value = value;
  };

  // 活动修改信息存储
  const activityModify = ref({
    moviegoerList: []
  });

  // 设置活动信息
  const setActivityModify = (value) => {
    activityModify.value = { ...activityModify.value, ...value };
  };

  return {
    activityDetails,
    setActivityDetails,
    orderNo,
    setOrderNo,
    activitiesPrice,
    setPrice,
    activityModify,
    setActivityModify
  };
});
